
#ifndef _CONFIG_H_
#define _CONFIG_H_

#define SELF_TEST
//#define COMM_RECV_ENABLE

#define TRACE printf

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;

#ifdef WIN32

#include "windows.h"

	typedef SOCKADDR_IN sockaddr_in;
	typedef SOCKET	sockfd;

	typedef DWORD (*thread_fn_t)(LPVOID pM);

#else

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <semaphore.h>
#include <errno.h>

	typedef struct sockaddr_in sockaddr_in;
	typedef int	sockfd;
	typedef struct sockaddr sockaddr;

	typedef pthread_mutex_t mutex_t;

	typedef pthread_t thread_t;
	typedef void (*thread_fn_t)(void *arg);

	typedef sem_t ssem_t;

#endif


#include "stdio.h"
#include "global.h"

#endif /* _CONFIG_H_ */
